package com.example.hangzhou.welbeing.mytestdemoapp.activity;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.design.widget.TabLayout;
import android.support.v4.view.ViewPager;
import android.support.v7.app.AppCompatActivity;

import com.example.hangzhou.welbeing.mytestdemoapp.R;
import com.example.hangzhou.welbeing.mytestdemoapp.adpater.RecyclerViewFragmentAdapter;

import butterknife.Bind;
import butterknife.ButterKnife;

/**
 * 杭州惟君医疗科技有限公司14
 * Created by 20433 on 2018/3/8
 */

public class RecyclerViewActivity extends AppCompatActivity {


    @Bind(R.id.activity_recycler_view_tablayout)
    TabLayout activityRecyclerViewTablayout;
    @Bind(R.id.activity_recycler_view_viewpager)
    ViewPager activityRecyclerViewViewpager;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_recycler_view);
        ButterKnife.bind(this);
        RecyclerViewFragmentAdapter  recyclerViewFragmentAdapter = new RecyclerViewFragmentAdapter(getSupportFragmentManager());
        activityRecyclerViewViewpager.setAdapter(recyclerViewFragmentAdapter);
        activityRecyclerViewTablayout.setupWithViewPager(activityRecyclerViewViewpager);
    }
}
